<template>
  <view class="container">

    <!-- 顶部 Header -->
    <view class="header">
      <image class="avatar" src="/static/background/chenglong.jpg"></image>
      <view class="user-info">
        <text class="welcome">Hi~ 欢迎回来</text>
        <view class="login-btn" @click="goLogin">登录</view>
      </view>
    </view>

    <!-- 关注 / 话题 -->
    <view class="stats">
      <view class="stat-item">
        <text class="num">3</text>
        <text class="label">关注</text>
      </view>

      <view class="divider"></view>

      <view class="stat-item">
        <text class="num">0</text>
        <text class="label">话题</text>
      </view>
    </view>

    <!-- 图标菜单 -->
    <view class="menu">
      <view class="menu-item">
		<text class="icon">⚙️</text>
        <text>收藏</text>
      </view>
      <view class="menu-item">
		<text class="icon">⚙️</text>
        <text>历史</text>
      </view>
      <view class="menu-item">
        <text class="icon">⚙️</text>
        <text>设置</text>
      </view>
    </view>

    <!-- Banner -->
    <image class="banner" src="/static/banner.png" mode="widthFix"></image>

    <!-- 发布 新鲜事 -->
    <view class="post-area">
      <view class="icons">
        <view class="item blue">🖼</view>
        <view class="item pink">🖼️</view>
        <view class="item yellow">🔗</view>
      </view>

      <view class="desc">
        已有 <text class="bold">385,893</text> 人在这里发布身边的新鲜事
      </view>

      <view class="publish-btn">我也要发布</view>

      <view class="go-browse">先去逛逛 ></view>
    </view>

  </view>
</template>

<script>
export default {
  data() {
    return {};
  },
  methods: {
	  goLogin(){
	  	uni.reLaunch({
	  		url:"/pages/newsTabBar/newsLogin/newsLogin"
	  	})
	  }
  }
};
</script>

<style scoped>
.container {
  width: 100%;
  background: #fff;
}

/* 顶部 */
.header {
  display: flex;
  padding: 30rpx;
  background: linear-gradient(120deg, #e19f9c, #b36f64);
  border-radius: 0 0 20rpx 20rpx;
  align-items: center;
}
.avatar {
  width: 120rpx;
  height: 120rpx;
  border-radius: 60rpx;
}
.user-info {
  margin-left: 20rpx;
}
.welcome {
  font-size: 32rpx;
  color: #fff;
}
.login-btn {
  margin-top: 10rpx;
  padding: 10rpx 30rpx;
  background: #ff6d6d;
  color: #fff;
  border-radius: 30rpx;
  font-size: 26rpx;
}

/* 关注统计 */
.stats {
  margin-top: 20rpx;
  padding: 30rpx 0;
  display: flex;
  justify-content: center;
  align-items: center;
}
.stat-item {
  text-align: center;
  margin: 0 40rpx;
}
.num {
  font-weight: bold;
  font-size: 32rpx;
}
.label {
  font-size: 26rpx;
  color: #666;
}
.divider {
  width: 2rpx;
  height: 60rpx;
  background: #ccc;
}

/* 图标菜单 */
.menu {
  margin-top: 20rpx;
  display: flex;
  justify-content: space-around;
  padding: 20rpx 0;
  border-bottom: 1px solid #eee;
}
.menu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 26rpx;
}
.icon {
  font-size: 40rpx;
  margin-bottom: 10rpx;
}

/* Banner */
.banner {
  width: 100%;
  margin-top: 20rpx;
}

/* 发布区域 */
.post-area {
  margin-top: 40rpx;
  text-align: center;
}
.icons {
  display: flex;
  justify-content: center;
  margin-bottom: 20rpx;
}
.item {
  width: 120rpx;
  height: 120rpx;
  line-height: 120rpx;
  text-align: center;
  margin: 0 10rpx;
  border-radius: 20rpx;
  font-size: 50rpx;
  color: white;
}
.blue { background: #7bb8ff; }
.pink { background: #ff9cad; }
.yellow { background: #ffd86b; }

.desc {
  font-size: 26rpx;
  margin-bottom: 20rpx;
}
.bold {
  font-weight: bold;
}

.publish-btn {
  width: 60%;
  margin: 20rpx auto;
  background: #ff6d6d;
  color: white;
  padding: 20rpx 0;
  border-radius: 50rpx;
  font-size: 28rpx;
}

.go-browse {
  font-size: 26rpx;
  color: #888;
  margin-bottom: 40rpx;
}
</style>